/*
 * PinConfiguration.hpp
 *
 *  Created on: 6 dec. 2012
 *      Author: Admin
 */


#ifndef PINCONFIGURATION_HPP_
#define PINCONFIGURATION_HPP_

/**
 * HardwareController defines a interface for communication with the robots hardware
 */
class HardwareController {
public:
	virtual ~HardwareController() { };

	/**
	 * Polls the light sensor on the left side of the robot
	 */
	virtual bool pollColorlaneLeft() = 0;

	/**
	 * Polls the light sensor on the right side of the robot
	 */
	virtual bool pollColorlaneRight() = 0;

	/**
	 * Polls the side exit sensor on the left side of the robot
	 */
	virtual bool pollSideExitLeft() = 0;

	/**
	 * Polls the side exit sensor on the right side of the robot
	 */
	virtual bool pollSideExitRight() = 0;

	/**
	 * Polls the cross roads sensor
	 */
	virtual bool pollCrossRoadsSensor() = 0;

	/**
	 * Polls the CollisionSensor mounted on the backside of the robot
	 */
	virtual bool pollCollisionSensorBack() = 0;

	/**
	 * Polls the CollisionSensor mounted on the frontside of the robot
	 */
	virtual bool pollCollisionSensorFront() = 0;

	/**
	 * Polls the DistanceSensor
	 */
	virtual bool pollDistanceSensor() = 0;

	/**
	 * Polls the EmergencyStop
	 */
	virtual bool pollEmergencyStop() = 0;

	/**
	 * Activates the wheels (enables the brick control actuator)
	 */
	virtual void activateWheels() = 0;

	/**
	 * Disables the wheels (disables the brick control actuator)
	 */
	virtual void disableWheels() = 0;

	/**
	 * Activates the LED
	 */
	virtual void activateLED() = 0;

	/**
	 * Disables the LED
	 */
	virtual void disableLED() = 0;

	/**
	 * Makes the left wheel turn forward
	 */
	virtual void leftWheelForward() = 0;

	/**
	 * Makes the left wheel turn backward
	 */
	virtual void leftWheelBackward() = 0;

	/**
	 * Makes the right wheel turn forward
	 */
	virtual void rightWheelForward() = 0;

	/**
	 * Makes the right wheel turn backward
	 */
	virtual void rightWheelBackward() = 0;

	/**
	 * Wait a certain amount of ms
	 * @param ms amount of milliseconds the robot should wait
	 */
	virtual void wait(unsigned int ms) = 0;

	/**
	 * Wait a certain amount of ms and decrements the given paramater
	 * @param ms amount of milliseconds the robot should wait, this value will be decremented by 1 for every ms that has passed
	 */
	virtual void wait(unsigned int* ms) = 0;
};

#endif /* PINCONFIGURATION_HPP_ */
